<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        async function async1() {
            console.log('1 go');
            await async2(); // await 后 一般是 promise 也可以不是
            // await 语句执行后，后面的代码和thenable进入event loop里等着
            console.log('1 ed')
            console.log('1 ed2')
        }
        async function async2() {
            console.log('2 go')
        }
        async1();
        console.log('outer go');
    </script>
</body>

</html>